<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('创建项目列表')" />
    <link rel="stylesheet" href="../../../../../../../../../../../../css/navigation.css">
</head>
<body class="gray-bg">
<div class="navigation visible-xs-block">
    <ol class="breadcrumb">
        <span> > </span>
        <li><a href="#" onclick="gomain()">主页</a></li>
        <li style="color: black">项目基本信息</li>
    </ol>
    <div class="aLine"></div>
</div>
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>创建者：</label>
                                <input type="text" name="pFounder"/>
                            </li>
                            <li>
                                <label>建筑名称：</label>
                                <input type="text" name="pName"/>
                            </li>
                            <li class="select-time">
                                <label>创建时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginPTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endPTime]"/>
                            </li>
                            <li>
                                <label>建筑地址：</label>
                                <input type="text" name="pAddress"/>
                            </li>
                            <li>
                                <label>建筑面积：</label>
                                <input type="text" name="pArea"/>
                            </li>
                            <li>
                                <label>建筑层数：</label>
                                <input type="text" name="pLayer"/>
                            </li>
                            <li>
                                <label>建筑高度：</label>
                                <input type="text" name="pHighly"/>
                            </li>
                            <li>
                                <label>建筑施工范围：</label>
                                <input type="text" name="pScope"/>
                            </li>
                            <li>
                                <label>水泵房容量：</label>
                                <input type="text" name="pWaterpumpCapacity"/>
                            </li>
                            <li>
                                <label>水泵房位置：</label>
                                <input type="text" name="pWaterpumpLocation"/>
                            </li>
                            <li>
                                <label>消防控制室位置：</label>
                                <input type="text" name="pFireLocation"/>
                            </li>
                            <li>
                                <label>消防控制室面积：</label>
                                <input type="text" name="pFireArea"/>
                            </li>
                            <li>
                                <label>使用点位联系人：</label>
                                <input type="text" name="pUnitContact"/>
                            </li>
                            <li>
                                <label>联系电话：</label>
                                <input type="text" name="pTelephone"/>
                            </li>
                            <li>
                                <label>项目状态：</label>
<!--                                <input type="text" name="pState"/>-->
                                <select id="pState" name="pState" th:with="type=${@dict.getType('z_project_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:building:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:building:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:building:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:building:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script src="../../../../../../../../../../../../js/breadcrumb.js"></script>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:building:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:building:remove')}]];
        var prefix = ctx + "system/building";
        var mStatus = [[${@dict.getType('z_project_status')}]];

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                showColumns: false,
                modalName: "创建项目",
                columns: [{
                    checkbox: true

                },
                {
                    field: 'pId', 
                    title: '项目id',
                    visible: false
                },
                {
                    field: 'pFounder',
                    title: '创建者',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pName', 
                    title: '建筑名称',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pTime', 
                    title: '创建时间',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pAddress', 
                    title: '建筑地址',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pArea', 
                    title: '建筑面积',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pLayer', 
                    title: '建筑层数',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pHighly', 
                    title: '建筑高度',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pScope', 
                    title: '建筑施工范围',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pWaterpumpCapacity', 
                    title: '水泵房容量',
                    cellStyle:{
                        css:{"background":"lightyellow"}
                    },
                },
                {
                    field: 'pWaterpumpLocation', 
                    title: '水泵房位置',
                    cellStyle:{
                        css:{"background":"lightyellow"}
                    },
                },
                {
                    field: 'pFireLocation', 
                    title: '消防控制室位置',
                    cellStyle:{
                        css:{"background":"#ff7474"}
                    },
                },
                {
                    field: 'pFireArea', 
                    title: '消防控制室面积',
                    cellStyle:{
                        css:{"background":"#ff7a7a"}
                    },
                },
                {
                    field: 'pUnitContact', 
                    title: '使用点位联系人',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pTelephone', 
                    title: '联系电话',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                },
                {
                    field: 'pState', 
                    title: '项目状态',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(mStatus, value);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    cellStyle:{
                        css:{"background":"#eff3f8"}
                    },
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.pId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>